function function_area(type) {
    // 发送确认请求，根据返回结果渲染
    fetch(`/index/warehouse_func/?type=${type}`, {
        method: 'GET',
        headers: {
          'X-Requested-With': 'XMLHttpRequest'
        }
    })
    .then(response => response.json())
    .then(data => {
        window.location.reload();
    })
    .catch(error => console.error('Error:', error));
}